package com.example.administrator.zhongyichou.activity;

import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.example.administrator.zhongyichou.Bean.BaseEventBean;
import com.example.administrator.zhongyichou.R;
import com.example.administrator.zhongyichou.base.BaseActivity;
import com.example.administrator.zhongyichou.net.core.HttpLoader;
import com.example.administrator.zhongyichou.net.protocol.GsonBaseProtocol;
import com.example.administrator.zhongyichou.view.HeaderView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by lichenyu on 2017/12/13.
 * 描述：
 */

public class PayHelpActivity extends BaseActivity {
    @BindView(R.id.headerview)
    HeaderView headerview;
    @BindView(R.id.edit_money)
    EditText editMoney;
    @BindView(R.id.txt_price)
    TextView txtPrice;
    @BindView(R.id.txt_pay)
    TextView txtPay;

    @Override
    protected void init() {
        ButterKnife.bind(this);
        initHead();
        editMoney.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {

            }

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
                txtPrice.setText("￥" + s.toString() + "元");
            }

            @Override
            public void afterTextChanged(Editable s) {

            }
        });
    }

    @Override
    protected void responseData(GsonBaseProtocol mGsonBaseProtocal) throws NullPointerException {

    }

    @Override
    protected HttpLoader initHttpLoader() {
        return null;
    }

    @Override
    protected int initContentView() {
        return R.layout.pay_help_activity;
    }

    @Override
    public boolean onEventBus(BaseEventBean baseEventBean) {
        return false;
    }

    private void initHead() {
        headerview.setTitle("支付");
        headerview.bindOnclickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                switch (v.getId()) {
                    case HeaderView.LEFT:
                        finish();
                        break;
                }
            }
        });
    }

    @OnClick(R.id.txt_pay)
    public void onViewClicked() {

    }
}
